package ar.edu.unlp.info.tesis.controladores.lrs;

import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;

import ar.edu.unlp.info.tesis.controladores.GenericController;
import ar.edu.unlp.info.tesis.controladores.lrs.response.RestResponse;

public class GenericRestController extends GenericController{

	@ExceptionHandler(Exception.class)
	@ResponseStatus(value=HttpStatus.INTERNAL_SERVER_ERROR)
	@ResponseBody
	public RestResponse restError(Exception exception)
	{
		return new RestResponse(true, exception.toString(), null);
	}
}
